
#将玩家标记为正在空降，并恢复满血量
tag @s add AirBorning
effect give @s instant_health 1 9 true

#1、生成即将空降的角色对应的盔甲架
summon minecraft:armor_stand ~ ~1 ~ {Tags:[AirBorne],Marker:1b,CustomNameVisible:0b,Invulnerable:1b,PersistenceRequired:1b,NoGravity:1b,OnGround:1b,Invisible:1,Small:1,NoBasePlate:1,Rotation:[0f]}

#2、在随机玩家身边随机标记空降位置，若无其他玩家则在原地随机标记空降位置
execute at @r[tag=Alive] run spreadplayers ~ ~ 4 10 false @e[type=minecraft:armor_stand,tag=AirBorne,sort=nearest]
execute unless entity @a[tag=Alive] run spreadplayers ~ ~ 2 4 false @e[type=minecraft:armor_stand,tag=AirBorne,sort=nearest]

#3、将玩家传送至盔甲架上空
execute as @s at @e[type=minecraft:armor_stand,tag=AirBorne] run tp @s ~ ~35 ~ facing ~ -50 ~

#4、告知其他玩家重新登场


#5、生成空降特效与音效并清除盔甲架
execute at @e[type=minecraft:armor_stand,tag=AirBorne] run playsound minecraft:block.beacon.power_select player @a ~ ~ ~ 3 1
execute at @e[type=minecraft:armor_stand,tag=AirBorne] run playsound minecraft:entity.bat.takeoff player @a ~ ~ ~ 3 0.7
execute at @e[type=minecraft:armor_stand,tag=AirBorne] run summon minecraft:armor_stand ~ ~1 ~ {Tags:[AirBorneSign],Marker:1b,CustomNameVisible:0b,Invulnerable:1b,PersistenceRequired:1b,NoGravity:1b,OnGround:1b,Invisible:1,Small:1,NoBasePlate:1,Rotation:[0f]}
kill @e[type=minecraft:armor_stand,tag=AirBorne]